package com.my.lucky.repository;

import com.my.lucky.model.FilterCondition;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface FilterConditionRepository extends JpaRepository<FilterCondition, Long> {
    // 根据用户ID查询所有过滤条件
    List<FilterCondition> findByUserIdOrderByCreatedAtDesc(Long userId);

    // 根据用户ID和名称查询
    FilterCondition findByUserIdAndName(Long userId, String name);
}
